package com.example.demo.entity;

/**
 * @Author: WinstonDeng
 * @Description:
 * @Date: Created in 18:07 2020/4/7
 * @Modified by:
 */
public class Patient {
    private long id;
    private String openId;
    private String nickName;
    private String idCard;
    private String phoneNum;
    private int age;
    private String realName;
    private String gender;
    private String bedNum;
    private String hospNum;
    public static final String BEDNUM_DEFAULT = "待分配";
    public static final String HOSPNUM_DEFAULT = "待分配";

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBedNum() {
        if(bedNum == null || bedNum.isEmpty()){
            bedNum = BEDNUM_DEFAULT;
        }
        return bedNum;
    }

    public void setBedNum(String bedNum) {
        this.bedNum = bedNum;
    }

    public String getHospNum() {
        if(hospNum == null || hospNum.isEmpty()){
            hospNum = HOSPNUM_DEFAULT;
        }
        return hospNum;
    }

    public void setHospNum(String hospNum) {
        this.hospNum = hospNum;
    }

    @Override
    public String toString() {
        return "Patient{" +
                "id=" + id +
                ", openId='" + openId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", idCard='" + idCard + '\'' +
                ", phoneNum='" + phoneNum + '\'' +
                ", age=" + age +
                ", realName='" + realName + '\'' +
                ", gender='" + gender + '\'' +
                ", bedNum='" + bedNum + '\'' +
                ", hospNum='" + hospNum + '\'' +
                '}';
    }
}
